﻿using System;
using System.Collections.Generic;
using System.Xml.Serialization;

namespace LdtJudge.DataEngine.Model.XMLConfigModel.ConfigModel
{
    /// <summary>
    /// 机器学习逻辑分段配置
    /// 20240110syjie
    /// </summary>
    [Serializable]
    [XmlRootAttribute("root", IsNullable = false)]
    public class ParagraphMLConfigModel
    {
        /// <summary>
        /// 逻辑分段列表
        /// </summary>
        [XmlElementAttribute("casetype", IsNullable = false)]
        public List<ParagraphCaseTypeConfig> caseTypeConfigList = new List<ParagraphCaseTypeConfig>();
    }
    /// <summary>
    /// 案件类型与文书类型模型
    /// </summary>
    public class ParagraphCaseTypeConfig
    {
        /// <summary>
        /// 案件类型：a1
        /// </summary>
        [XmlAttribute("code")]
        public string code { get; set; }

        /// <summary>
        /// 文书类型：WS010000993
        /// </summary>
        [XmlAttribute("booketype")]
        public string booketype { get; set; }

        /// <summary>
        /// appid：caseworkingparagjqxx
        /// </summary>
        [XmlAttribute("appid")]
        public string appid { get; set; }

        /// <summary>
        /// 逻辑分段
        /// </summary>
        [XmlElementAttribute("paragraph", IsNullable = false)]
        public List<ParagraphConfig> paragraphList = new List<ParagraphConfig>();
    }
    /// <summary>
    /// 逻辑分段模型
    /// </summary>
    public class ParagraphConfig
    {
        /// <summary>
        /// 源
        /// </summary>
        [XmlAttribute("convertcode")]
        public string convertcode { get; set; }

        /// <summary>
        /// 目标
        /// </summary>
        [XmlAttribute("targetcode")]
        public string targetcode { get; set; }

        /// <summary>
        /// 子级
        /// </summary>
        [XmlElementAttribute("paragraph", IsNullable = false)]
        public List<ParagraphConfig> childrenList = new List<ParagraphConfig>();
    }
}
